package com.xge.component_caipu.binder

import com.xge.common_libary.bean.Material
import com.xge.common_libary.view.utils.BaseBindingBinder
import com.xge.common_libary.view.utils.BindingViewHolder
import om.xge.component_caipu.databinding.ItemCailiaoContentBinding

class ItemCaiLiaoContentBinder :
    BaseBindingBinder<Material, ItemCailiaoContentBinding>(ItemCailiaoContentBinding::inflate) {
    override fun onBindViewHolder(
        holder: BindingViewHolder<Material, ItemCailiaoContentBinding>, item: Material
    ) {
        holder.run {
            if(!item.mname.isNullOrEmpty()){
                binding.tvName.text = item.mname
                binding.tvAmount.text = item.amount.toString()
            }
        }
    }
}